PROJECT(all_test)

file(GLOB_RECURSE UTIL_FILES ${CMAKE_SOURCE_DIR}/src/util/*.h)
file(GLOB_RECURSE PROJECT_ROOT_FILES ${PROJECT_SOURCE_DIR}/*.h ${PROJECT_SOURCE_DIR}/*.c ${PROJECT_SOURCE_DIR}/*.cpp)
file(GLOB_RECURSE test_const_string_FILES ${CMAKE_SOURCE_DIR}/src/test_const_string/gtest/*.h ${CMAKE_SOURCE_DIR}/src/test_const_string/gtest/*.c ${CMAKE_SOURCE_DIR}/src/test_const_string/gtest/*.cpp)
file(GLOB_RECURSE test_kmp_FILES ${CMAKE_SOURCE_DIR}/src/test_kmp/gtest/*.h ${CMAKE_SOURCE_DIR}/src/test_kmp/gtest/*.c ${CMAKE_SOURCE_DIR}/src/test_kmp/gtest/*.cpp)


set(ALL_FILES
    ${PROJECT_ROOT_FILES}
    ${UTIL_FILES} 
    ${test_const_string_FILES}
    ${test_kmp_FILES}
)

source_group(TREE ${CMAKE_SOURCE_DIR}/src FILES ${ALL_FILES})

ADD_EXECUTABLE(
    ${PROJECT_NAME}
    ${ALL_FILES}
)

target_link_libraries(${PROJECT_NAME} GTest::gtest)

INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}")
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/src/util/include")